#include<iostream>
#include "Comm.hpp"


class Client
{
public:
    Client():_fd(gdefultfd)
    {}

    bool OpenPipeForWrite()
    {
        _fd = OpenPipe(gForWrite);
        if(_fd < 0) return false;
        return true;
    }

    //输入型参数
    int SendPipe(const std::string& in)
    {
        return ::write(_fd,in.c_str(),in.size());
    }

    void ClosePipe()
    {
        ClosePipeHelper(_fd);
    }

    ~Client()
    {
        
    }
private:
    int _fd;
};